package com.goktech.olala.core.service.impl;

import com.goktech.olala.core.service.ICustomerCollectService;
import com.goktech.olala.server.dao.customer.CustomerCollectMapper;
import com.goktech.olala.server.pojo.customer.CustomerCollect;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Classname ICustomerCollectServiceImp
 * @Description TODO
 * @Date 2020/12/21 21:59
 * @Created by ASUS
 */
@Service
public class ICustomerCollectServiceImp implements ICustomerCollectService {

    @Autowired
    CustomerCollectMapper customerCollectMapper;

    @Override
    public int deleteByPrimaryKey(Integer collectId) {
        int i = customerCollectMapper.deleteByPrimaryKey(collectId);
        return i;
    }

    @Override
    public int insert(CustomerCollect record) {
        int insert = customerCollectMapper.insert(record);
        return insert;
    }

    @Override
    public CustomerCollect selectByPrimaryKey(Integer collectId) {
        CustomerCollect customerCollect = customerCollectMapper.selectByPrimaryKey(collectId);
        return customerCollect;
    }

    @Override
    public List<CustomerCollect> selectAll() {
        List<CustomerCollect> customerCollects = customerCollectMapper.selectAll();
        return customerCollects;
    }

    @Override
    public int updateByPrimaryKey(CustomerCollect record) {
        int i = customerCollectMapper.updateByPrimaryKey(record);
        return i;
    }

    @Override
    public List<CustomerCollect> selectByCustomerId(String customerId) {
        List<CustomerCollect> customerCollectList = customerCollectMapper.selectByCustomerId(customerId);
        return customerCollectList;
    }
}
